<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<title>调拨申请列表｜海外仓管理</title>
<script type="text/javascript">
	jQuery(document).ready(function(){
		
	});
	function deleteRquestGoods(){
		if(confirm("确定删除所选吗?")){
			$("#mainform").submit();
		}
	}
	function closepurchasing(id)
	{
		if(confirm("确定关闭调拨申请吗?")){
			$.post("/oversea/ajaxbutton", {"op": "closepurchasing","id":id},
 				function(data){
					
			},"json");
		}
	}
</script>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent tables">
  <div class="pageheader notab">
    <h1 class="pagetitle">调拨申请列表</h1>
    <span class="pagedesc">常规定期补货：每月27日至月底，根据各自店铺的销售情况申请调拨未来一个月所需的库存数量，采购在月底提单统一采购。<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;应考虑采购前置期 [ 生产天数 (默认1个月) + 运输天数 + 安全库存天数 ]以及促销和旺季等因素。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;以美国海运补货为例，1月底提的需求数量，实际是为4月销售需求。 
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FF0000">空运1箱起运，重量大约20kg为宜。海运1立方米起运，3立方米以上更经济。</font></span> 
     <div class="menulist">
        		<ul class="profile_summary">
                        <li> <a href="/oversea/purchasing" class=""><span>申请调拨</span></a></li>
                        
                    </ul>
               </div>
    </div>
  <!--pageheader-->
  <div>
  <div style="float:left">  &nbsp;&nbsp; <a href="javascript:void(0)" onClick="deleteRquestGoods()" class="btn btn2 btn_help"><span>删除所选 </span></a></div>
  <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
 </div>
  <div id="contentwrapper" class="contentwrapper"> 
    <!--搜索栏-->
    <form class="stdform stdform2" method="get" action="/oversea/purchasinglist">
      <div class="tableoptions"> 操作时间：
        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       其他搜索: <input type="text" name="other" id="other" class="width100" value="{{$other}}" />
        SKU: <input type="text" name="sku" id="sku" class="width100" value="{{$sku}}" />
       店铺名: <input type="text" name="shopname" id="other" class="width100" value="{{$shopname}}" />
创建者：<input type="text" name="createUser" id="createUser" class="width100" value="{{$createUser}}" /> 
		状态：<select name="shiptype" id="shiptype">
		<option value="">-请选择-</option>
		  <option value="11" {{if $shiptype=='11'}} selected{{/if}}>新创建</option>
            <option value="1" {{if $shiptype=='1'}} selected{{/if}}>待审核</option>
   		  <option value="2" {{if $shiptype=='2'}} selected{{/if}}>一审通过</option>
          <option value="3" {{if $shiptype=='3'}} selected{{/if}}>二审通过</option>
           <option value="4" {{if $shiptype=='4'}} selected{{/if}}>关闭</option>
            <option value="5" {{if $shiptype=='5'}} selected{{/if}}>已完成</option>
        </select>                      
        &nbsp;
        <button class="radius3">Search</button>
         &nbsp; &nbsp; &nbsp; &nbsp;
      </div>
    </form>
    <!--搜索栏结束-->
    <div class="x_content" style="overflow-x:auto;">
    <form class="stdform stdform2" id="mainform" method="post" action="/oversea/ajaxbutton?op=delpurlist">
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
      <colgroup>
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      </colgroup>
      <thead>
        <tr>
          <th class="head0"><input name="allchk" id="allchk" type="checkbox" onClick="allSelect('ppid[]')"></th>
          <th class="head0">申请编号</th>
           <th class="head0">始发仓</th>
           <th class="head0">目的地</th>
          <th class="head0">店铺</th>
          <th class="head0">运输方式</th>
          <th class="head0">申请状态</th>
          <th class="head1">申请人</th>
        
          <th class="head0">SKU数</th>
          <th class="head0">数量</th>
          <th class="head0">商品成本</th>
        <th class="head0">创建时间</th>
          <th class="head0">操作</th>
        </tr>
      </thead>
      <tbody>
      {{foreach from=$list item=li key=key}}
      <tr {{if $li.goods.st==1}}bgcolor="#FFD2D2" title="带商标商品"{{/if}}>
        <td>
        {{if $li.status==0}}
        <input name="ppid[]" type="checkbox" value="{{$li.id}}">
        {{/if}}
        </td>
         <td>{{$li.demand_number}}</td>
         <td>{{$li.starthouse}}</td>
        <td>{{$li.seawarehouse}}</td>
        <td>{{$li.shopname}}</td>
        <td>{{$li.transportation}}</td>
        <td>
        {{if $li.status==0}}新创建{{/if}}
        {{if $li.status==1}}待审核{{/if}}
        {{if $li.status==2}}一审通过{{/if}}
        {{if $li.status==3}}二审通过{{/if}}
        {{if $li.status==4}}关闭{{/if}}
        {{if $li.status==5}}已完成{{/if}}
        </td>
        <td>{{$li.create_user}}</td>
       
        <td class="center">{{$li.skucount}}个</td>
        <td class="center">{{$li.nums}}</td>
        <td class="center">{{$li.costprice}}</td>
         <td class="center">{{$li.updatetime}}</td>
        <td class="center">
        
        
        {{if $li.status==0}}
        	{{if $li.isedit==1}}
        <a href="javascript:void(0)" onClick="getTchangstatus(1,{{$li.id}})" >请求一审</a> ｜<a href="/oversea/ajaxbutton?op=demandList&id={{$li.id}}" target="_blank">编辑</a> ｜
        	{{/if}}
        {{/if}}
        
         {{if $li.status==1 && $firsttrialman ==1}}
       		<a href="javascript:void(0)" onClick="changstatus(2,{{$li.id}},1)" >一审通过</a>｜
        {{/if}}
         {{if $li.status==2 && $secondtrialman ==1}} 
         	<a href="javascript:void(0)" onClick="changstatus(3,{{$li.id}},1)" >二审通过</a>｜
        {{/if}}
      
      	 <a href="/oversea/ajaxbutton?op=demandList&id={{$li.id}}" target="_blank">查看</a>
       
       {{if $li.status==3}}
       | <a href="/oversea/deliveryplanpro?other={{$li.demand_number}}" target="_blank">调拨列表</a>
       			{{if $li.isedit==1}}
       	 
         |  <a href="javascript:void(0)" onClick="closepurchasing({{$li.id}})" >关闭调拨</a>
         		{{/if}}
       {{/if}}
         </td>
      </tr>
      {{/foreach}}      
        </tbody>
        </table>
     </form>
    </div>
    <div class="page">{{$pageList}}</div>
    <br />
    <br />
  </div>
</div>
<!--bodywrapper-->

</body>
</html>